package com.gkj.blog.controller;

import com.gkj.blog.business.service.TagsService;
import com.gkj.blog.business.vo.entity.TagsVo;
import com.gkj.blog.framework.object.ResponseVO;
import com.gkj.blog.util.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/tags")
public class TagsController {
    @Autowired
    TagsService tagsService;

    @RequestMapping("/listAll")
    public ResponseVO listAllTags(){
        return ResultUtil.success(null,tagsService.listAllTags());
    }

    @PostMapping("/getTags")
    public ResponseVO getTags(@RequestParam("tagIds[]") Long[] tagIds){
        return ResultUtil.success(null,tagsService.getTags(tagIds));
    }
}